<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/BasePhyLayer.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00285.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">BasePhyLayer.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef BASEPHYLAYER_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define BASEPHYLAYER_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;MiXiMDefs.h&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;connectionManager/ConnectionManagerAccess.h&quot;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;DeciderToPhyInterface.h&quot;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;MacToPhyInterface.h&quot;</span>
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;ChannelInfo.h&quot;</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="keyword">class </span><a class="code" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a>;
<a name="l00016"></a>00016 <span class="keyword">class </span><a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>;
<a name="l00017"></a>00017 <span class="keyword">class </span><a class="code" href="a00030.html" title="Provides information and utility methods for the whole simulation.">BaseWorldUtility</a>;
<a name="l00018"></a>00018 <span class="keyword">class </span>cXMLElement;
<a name="l00019"></a>00019 
<a name="l00066"></a><a class="code" href="a00029.html">00066</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a>: <span class="keyword">public</span> <a class="code" href="a00053.html" title="Basic class for all physical layers, please don&#39;t touch!!">ConnectionManagerAccess</a>,
<a name="l00067"></a>00067                               <span class="keyword">public</span> <a class="code" href="a00079.html" title="This class is the interface for a Decider to the BasePhyLayer.">DeciderToPhyInterface</a>,
<a name="l00068"></a>00068                               <span class="keyword">public</span> <a class="code" href="a00134.html" title="Defines the methods provided by the phy to the mac layer.">MacToPhyInterface</a> {
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 <span class="keyword">protected</span>:
<a name="l00071"></a>00071 
<a name="l00072"></a>00072   <span class="keyword">enum</span> ProtocolIds {
<a name="l00073"></a>00073     GENERIC = 0,
<a name="l00074"></a>00074   };
<a name="l00075"></a>00075 
<a name="l00076"></a>00076   <span class="keywordtype">int</span> protocolId;
<a name="l00077"></a>00077 
<a name="l00089"></a><a class="code" href="a00029.html#ac68a290868512c992f8a49b6af7b6c7c">00089</a>   <span class="keyword">static</span> <span class="keywordtype">short</span> <a class="code" href="a00029.html#ac68a290868512c992f8a49b6af7b6c7c" title="Defines the scheduling priority of AirFrames.">airFramePriority</a>;
<a name="l00090"></a>00090 
<a name="l00092"></a><a class="code" href="a00029.html#afedc2cd6f80601fb040b56256e6cc756">00092</a>   <a class="code" href="a00055.html" title="Represents a constant mathematical mapping (f(x) = c)">ConstantSimpleConstMapping</a>* <a class="code" href="a00029.html#afedc2cd6f80601fb040b56256e6cc756" title="Defines the strength of the thermal noise.">thermalNoise</a>;
<a name="l00093"></a>00093 
<a name="l00095"></a><a class="code" href="a00029.html#a80fe7028b2fbf92f61dd30b79e30a86d">00095</a>   <span class="keywordtype">double</span> <a class="code" href="a00029.html#a80fe7028b2fbf92f61dd30b79e30a86d" title="The maximum transmission power a message can be send with.">maxTXPower</a>;
<a name="l00096"></a>00096 
<a name="l00098"></a><a class="code" href="a00029.html#a7eaa041636b623066b5abd87a38afa25">00098</a>   <span class="keywordtype">double</span> <a class="code" href="a00029.html#a7eaa041636b623066b5abd87a38afa25" title="The sensitivity describes the minimum strength a signal must have to be received.">sensitivity</a>;
<a name="l00099"></a>00099 
<a name="l00101"></a><a class="code" href="a00029.html#a71f6c8e91a8f597a5d213b30c64b0cf8">00101</a>   <span class="keywordtype">bool</span> <a class="code" href="a00029.html#a71f6c8e91a8f597a5d213b30c64b0cf8" title="Stores if tracking of statistics (esp. cOutvectors) is enabled.">recordStats</a>;
<a name="l00102"></a>00102 
<a name="l00107"></a><a class="code" href="a00029.html#a38d35bc99079eff49deb6c870b1175e7">00107</a>   <a class="code" href="a00043.html" title="This class is used by the BasePhyLayer to keep track of the AirFrames on the channel.">ChannelInfo</a> <a class="code" href="a00029.html#a38d35bc99079eff49deb6c870b1175e7" title="Channel info keeps track of received AirFrames and provides information about currently active AirFra...">channelInfo</a>;
<a name="l00108"></a>00108 
<a name="l00110"></a><a class="code" href="a00029.html#ab2a4c85442ff2436ca7fbe6c424c1b2c">00110</a>   <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>* <a class="code" href="a00029.html#ab2a4c85442ff2436ca7fbe6c424c1b2c" title="The state machine storing the current radio state (TX, RX, SLEEP).">radio</a>;
<a name="l00111"></a>00111 
<a name="l00113"></a><a class="code" href="a00029.html#a5be00b3a133596d8ed78a9f8e38973d4">00113</a>   <a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>* <a class="code" href="a00029.html#a5be00b3a133596d8ed78a9f8e38973d4" title="Pointer to the decider module.">decider</a>;
<a name="l00114"></a>00114 
<a name="l00116"></a><a class="code" href="a00029.html#ac8dca20c727bdb1494d97da1c64bb55d">00116</a>   <span class="keyword">typedef</span> std::vector&lt;AnalogueModel*&gt; <a class="code" href="a00029.html#ac8dca20c727bdb1494d97da1c64bb55d" title="Used to store the AnalogueModels to be used as filters.">AnalogueModelList</a>;
<a name="l00117"></a>00117 
<a name="l00119"></a><a class="code" href="a00029.html#abc00fc5777ef641f72b5a4d85bf65c93">00119</a>   <a class="code" href="a00029.html#ac8dca20c727bdb1494d97da1c64bb55d" title="Used to store the AnalogueModels to be used as filters.">AnalogueModelList</a> <a class="code" href="a00029.html#abc00fc5777ef641f72b5a4d85bf65c93" title="List of the analogue models to use.">analogueModels</a>;
<a name="l00120"></a>00120 
<a name="l00122"></a><a class="code" href="a00029.html#a49fcd06f6c27aab1d14d13eaecc09f1b">00122</a>   <span class="keywordtype">int</span> <a class="code" href="a00029.html#a49fcd06f6c27aab1d14d13eaecc09f1b" title="The id of the in-data gate from the Mac layer.">upperLayerIn</a>;
<a name="l00124"></a><a class="code" href="a00029.html#a334fbbb0a1608058c46906ef2c90045f">00124</a>   <span class="keywordtype">int</span> <a class="code" href="a00029.html#a334fbbb0a1608058c46906ef2c90045f" title="The id of the out-data gate to the Mac layer.">upperLayerOut</a>;
<a name="l00126"></a><a class="code" href="a00029.html#aca9b66970dd836cc696dd0907c58598b">00126</a>   <span class="keywordtype">int</span> <a class="code" href="a00029.html#aca9b66970dd836cc696dd0907c58598b" title="The id of the out-control gate to the Mac layer.">upperControlOut</a>;
<a name="l00128"></a><a class="code" href="a00029.html#ab58c7430371f1ba135e0a641d150c1e3">00128</a>   <span class="keywordtype">int</span> <a class="code" href="a00029.html#ab58c7430371f1ba135e0a641d150c1e3" title="The id of the in-control gate from the Mac layer.">upperControlIn</a>;
<a name="l00129"></a>00129 
<a name="l00134"></a><a class="code" href="a00029.html#ac28de586b21162c377a180233299a1d5">00134</a>   cMessage* <a class="code" href="a00029.html#ac28de586b21162c377a180233299a1d5" title="Self message scheduled to the point in time when the switching process of the radio is over...">radioSwitchingOverTimer</a>;
<a name="l00135"></a>00135 
<a name="l00140"></a><a class="code" href="a00029.html#a2ce22bc20ab469e99352958face5468d">00140</a>   cMessage* <a class="code" href="a00029.html#a2ce22bc20ab469e99352958face5468d" title="Self message scheduled to the point in time when the transmission of an AirFrame is over...">txOverTimer</a>;
<a name="l00141"></a>00141 
<a name="l00143"></a><a class="code" href="a00029.html#a4cd91821a30270d51c4c66594b9d7122">00143</a>   <span class="keyword">enum</span> <a class="code" href="a00029.html#a4cd91821a30270d51c4c66594b9d7122" title="The states of the receiving process for AirFrames.">eAirFrameStates</a> {
<a name="l00145"></a><a class="code" href="a00029.html#a4cd91821a30270d51c4c66594b9d7122aa0cb17278ea70e7e327de30aad32e0a0">00145</a>     START_RECEIVE = 1,
<a name="l00147"></a><a class="code" href="a00029.html#a4cd91821a30270d51c4c66594b9d7122a2900d4f5f03ec09b83e5c24744924755">00147</a>     <a class="code" href="a00029.html#a4cd91821a30270d51c4c66594b9d7122a2900d4f5f03ec09b83e5c24744924755" title="AirFrame is being received.">RECEIVING</a>,
<a name="l00149"></a><a class="code" href="a00029.html#a4cd91821a30270d51c4c66594b9d7122a8c8f8a59dc873e035f19750598ceb157">00149</a>     END_RECEIVE
<a name="l00150"></a>00150   };
<a name="l00151"></a>00151 
<a name="l00153"></a><a class="code" href="a00029.html#a75255fe80f09f87b7db213d21db3b8e8">00153</a>   <span class="keywordtype">long</span> <a class="code" href="a00029.html#a75255fe80f09f87b7db213d21db3b8e8" title="Stores the length of the phy header in bits.">headerLength</a>;
<a name="l00154"></a>00154 
<a name="l00156"></a><a class="code" href="a00029.html#ad1de573273df163a5fc2b8b537c65e23">00156</a>   <a class="code" href="a00030.html" title="Provides information and utility methods for the whole simulation.">BaseWorldUtility</a>* <a class="code" href="a00029.html#ad1de573273df163a5fc2b8b537c65e23" title="Pointer to the World Utility, to obtain some global information.">world</a>;
<a name="l00157"></a>00157 
<a name="l00158"></a>00158 <span class="keyword">private</span>:
<a name="l00159"></a>00159 
<a name="l00164"></a>00164   <span class="keywordtype">void</span> getParametersFromXML(cXMLElement* xmlData, <a class="code" href="a00079.html#a37995e7f41efc2f95b081653ca01b482" title="Used at initialization to pass the parameters to the AnalogueModel and Decider.">ParameterMap</a>&amp; outputMap) <span class="keyword">const</span>;
<a name="l00165"></a>00165 
<a name="l00170"></a>00170   <span class="keywordtype">void</span> initializeAnalogueModels(cXMLElement* xmlConfig);
<a name="l00171"></a>00171 
<a name="l00176"></a>00176   <span class="keywordtype">void</span> initializeDecider(cXMLElement* xmlConfig);
<a name="l00177"></a>00177 
<a name="l00178"></a>00178 <span class="keyword">protected</span>:
<a name="l00179"></a>00179 
<a name="l00190"></a>00190   <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt; T readPar(<span class="keyword">const</span> <span class="keywordtype">char</span>* parName, <span class="keyword">const</span> T defaultValue) <span class="keyword">const</span>;
<a name="l00191"></a>00191 
<a name="l00199"></a>00199   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00053.html#aad16a20e89c1415737abbebd2d2e4383" title="Register with ConnectionManager.">initialize</a>(<span class="keywordtype">int</span> stage);
<a name="l00200"></a>00200 
<a name="l00211"></a>00211   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleMessage(cMessage* msg);
<a name="l00212"></a>00212 
<a name="l00219"></a>00219   <span class="keyword">virtual</span> <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>* initializeRadio() <span class="keyword">const</span>;
<a name="l00220"></a>00220 
<a name="l00239"></a>00239   <span class="keyword">virtual</span> <a class="code" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a>* getAnalogueModelFromName(<span class="keyword">const</span> std::string&amp; name, <a class="code" href="a00079.html#a37995e7f41efc2f95b081653ca01b482" title="Used at initialization to pass the parameters to the AnalogueModel and Decider.">ParameterMap</a>&amp; params) <span class="keyword">const</span>;
<a name="l00240"></a>00240 
<a name="l00250"></a>00250   <span class="keyword">template</span> &lt;<span class="keyword">class</span> _AMODEL_CLASS_&gt;
<a name="l00251"></a><a class="code" href="a00029.html#a1e4dd47185d6931380f459c62200faee">00251</a>   _AMODEL_CLASS_* <a class="code" href="a00029.html#a1e4dd47185d6931380f459c62200faee" title="Creates and returns an instance of the analogue model with the specified _AMODEL_CLASS_.">createAnalogueModel</a>(<span class="keyword">const</span> <a class="code" href="a00079.html#a37995e7f41efc2f95b081653ca01b482" title="Used at initialization to pass the parameters to the AnalogueModel and Decider.">ParameterMap</a>&amp; params)<span class="keyword"> const </span>{
<a name="l00252"></a>00252     _AMODEL_CLASS_ *<span class="keyword">const</span> pAnalogueModel = <span class="keyword">new</span> _AMODEL_CLASS_();
<a name="l00253"></a>00253     <span class="keywordflow">if</span> (pAnalogueModel != NULL &amp;&amp; !pAnalogueModel-&gt;initFromMap(params)) {
<a name="l00254"></a>00254       opp_warning(<span class="stringliteral">&quot;Analog model from config.xml could not be initialized correctly!&quot;</span>);
<a name="l00255"></a>00255     }
<a name="l00256"></a>00256     <span class="keywordflow">return</span> pAnalogueModel;
<a name="l00257"></a>00257   }
<a name="l00258"></a>00258 
<a name="l00276"></a>00276   <span class="keyword">virtual</span> <a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>* getDeciderFromName(<span class="keyword">const</span> std::string&amp; name, ParameterMap&amp; params);
<a name="l00277"></a>00277 
<a name="l00287"></a>00287   <span class="keyword">template</span> &lt;<span class="keyword">class</span> _DECIDER_CLASS_&gt;
<a name="l00288"></a><a class="code" href="a00029.html#a5aa60c2caec2dad44aca154e0710a7e4">00288</a>   _DECIDER_CLASS_* <a class="code" href="a00029.html#a5aa60c2caec2dad44aca154e0710a7e4" title="Creates and returns an instance of the Decider with the specified _DECIDER_CLASS_.">createDecider</a>(<span class="keyword">const</span> <a class="code" href="a00079.html#a37995e7f41efc2f95b081653ca01b482" title="Used at initialization to pass the parameters to the AnalogueModel and Decider.">ParameterMap</a>&amp; params) {
<a name="l00289"></a>00289     _DECIDER_CLASS_ *<span class="keyword">const</span> pDecider = <span class="keyword">new</span> _DECIDER_CLASS_(<span class="keyword">this</span>, sensitivity, <a class="code" href="a00027.html#aabf0226159b22b46e70031fd3bb3b1b2" title="Function to get a pointer to the host module.">findHost</a>()-&gt;getIndex(), coreDebug);
<a name="l00290"></a>00290     <span class="keywordflow">if</span> (pDecider != NULL &amp;&amp; !pDecider-&gt;initFromMap(params)) {
<a name="l00291"></a>00291       opp_warning(<span class="stringliteral">&quot;Decider from config.xml could not be initialized correctly!&quot;</span>);
<a name="l00292"></a>00292     }
<a name="l00293"></a>00293     <span class="keywordflow">return</span> pDecider;
<a name="l00294"></a>00294   }
<a name="l00295"></a>00295 
<a name="l00299"></a>00299 
<a name="l00303"></a>00303   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleAirFrame(airframe_ptr_t frame);
<a name="l00304"></a>00304 
<a name="l00309"></a>00309   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleUpperMessage(cMessage* msg);
<a name="l00310"></a>00310 
<a name="l00315"></a>00315   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleUpperControlMessage(cMessage* msg);
<a name="l00316"></a>00316 
<a name="l00320"></a>00320   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleSelfMessage(cMessage* msg);
<a name="l00321"></a>00321 
<a name="l00327"></a>00327   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleChannelSenseRequest(cMessage* msg);
<a name="l00328"></a>00328 
<a name="l00332"></a>00332   <span class="keywordtype">void</span> handleAirFrameFirstReceive(airframe_ptr_t msg);
<a name="l00333"></a>00333 
<a name="l00337"></a>00337   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleAirFrameStartReceive(airframe_ptr_t msg);
<a name="l00338"></a>00338 
<a name="l00342"></a>00342   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleAirFrameReceiving(airframe_ptr_t msg);
<a name="l00343"></a>00343 
<a name="l00347"></a>00347   <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleAirFrameEndReceive(airframe_ptr_t msg);
<a name="l00348"></a>00348 
<a name="l00354"></a>00354 
<a name="l00359"></a>00359   <span class="keywordtype">void</span> sendControlMessageUp(cMessage* msg);
<a name="l00360"></a>00360 
<a name="l00364"></a>00364   <span class="keywordtype">void</span> sendMacPktUp(cMessage* pkt);
<a name="l00365"></a>00365 
<a name="l00369"></a>00369   <span class="keywordtype">void</span> sendMessageDown(airframe_ptr_t pkt);
<a name="l00370"></a>00370 
<a name="l00374"></a>00374   <span class="keywordtype">void</span> sendSelfMessage(cMessage* msg, simtime_t_cref time);
<a name="l00375"></a>00375 
<a name="l00382"></a>00382   <span class="keyword">virtual</span> airframe_ptr_t encapsMsg(cPacket *msg);
<a name="l00383"></a>00383 
<a name="l00387"></a>00387   <span class="keyword">virtual</span> <span class="keywordtype">void</span> filterSignal(airframe_ptr_t frame);
<a name="l00388"></a>00388 
<a name="l00398"></a>00398   <span class="keyword">virtual</span> <span class="keywordtype">void</span> finishRadioSwitching(<span class="keywordtype">bool</span> bSendCtrlMsg = <span class="keyword">true</span>);
<a name="l00399"></a>00399 
<a name="l00406"></a><a class="code" href="a00029.html#adecf85d8636ac48e1ce8cea176a3c71c">00406</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00029.html#adecf85d8636ac48e1ce8cea176a3c71c" title="Returns the identifier of the protocol this phy uses to send messages.">myProtocolId</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> protocolId; }
<a name="l00407"></a>00407 
<a name="l00423"></a><a class="code" href="a00029.html#a618479a7b36d43594ab3e8a7d80007bb">00423</a>   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="a00029.html#a618479a7b36d43594ab3e8a7d80007bb" title="Returns true if the protocol with the passed identifier is decodeable by the decider.">isKnownProtocolId</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keywordtype">id</span> == myProtocolId(); }
<a name="l00424"></a>00424 
<a name="l00425"></a>00425 <span class="keyword">private</span>:
<a name="l00428"></a>00428   <a class="code" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a>(<span class="keyword">const</span> <a class="code" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a>&amp;);
<a name="l00431"></a>00431   <a class="code" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a>&amp; <a class="code" href="a00053.html#a388dec50b11a24e08f6bf76c65993a6d" title="Assignment operator is not allowed.">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a>&amp;);
<a name="l00432"></a>00432 
<a name="l00433"></a>00433 <span class="keyword">public</span>:
<a name="l00434"></a>00434   <a class="code" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a>();
<a name="l00435"></a>00435 
<a name="l00439"></a>00439   <span class="keyword">virtual</span> ~<a class="code" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a>();
<a name="l00440"></a>00440 
<a name="l00442"></a>00442   <span class="keyword">virtual</span> <span class="keywordtype">void</span> finish();
<a name="l00443"></a>00443 
<a name="l00444"></a>00444   <span class="comment">//---------MacToPhyInterface implementation-----------</span>
<a name="l00449"></a>00449 <span class="comment"></span>
<a name="l00458"></a>00458   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00134.html#a00dd43576b4da205117d53bd3baadc71" title="Returns the current state the radio is in. See RadioState for possible values.">getRadioState</a>() <span class="keyword">const</span>;
<a name="l00459"></a>00459 
<a name="l00463"></a>00463   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="a00079.html#a7832acf422e9ae79fbf91af927ca9e44" title="Returns the true if the radio is in RX state.">isRadioInRX</a>() <span class="keyword">const</span>;
<a name="l00464"></a>00464 
<a name="l00475"></a>00475   <span class="keyword">virtual</span> simtime_t <a class="code" href="a00134.html#ad25abbad9aa16bdbf24bf1dd582b1c6f" title="Tells the BasePhyLayer to switch to the specified radio state.">setRadioState</a>(<span class="keywordtype">int</span> rs);
<a name="l00476"></a>00476 
<a name="l00482"></a>00482   <span class="keyword">virtual</span> <a class="code" href="a00044.html" title="Provides information about the current state of the channel:">ChannelState</a> <a class="code" href="a00134.html#affa30a25b96ffe387b22c68ca35f77a5" title="Returns the current state of the channel. See ChannelState for details.">getChannelState</a>() <span class="keyword">const</span>;
<a name="l00483"></a>00483 
<a name="l00489"></a>00489   <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="a00079.html#a7579990df34650e82125a1b91105ae15" title="Returns the length of the phy header in bits.">getPhyHeaderLength</a>() <span class="keyword">const</span>;
<a name="l00490"></a>00490 
<a name="l00492"></a>00492   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00134.html#a2e770727361fe1774b88d5667b89417e" title="Sets the channel currently used by the radio.">setCurrentRadioChannel</a>(<span class="keywordtype">int</span> newRadioChannel);
<a name="l00493"></a>00493 
<a name="l00495"></a>00495   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00079.html#a5c8df09fc0711587b07e2ac5d8412554" title="Returns the channel currently used by the radio.">getCurrentRadioChannel</a>() <span class="keyword">const</span>;
<a name="l00496"></a>00496 
<a name="l00498"></a>00498   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00079.html#ae6cc727e6364c8a55fb735d18f93faa8" title="Returns the number of channels available in radio.">getNbRadioChannels</a>() <span class="keyword">const</span>;
<a name="l00499"></a>00499 
<a name="l00502"></a>00502   <span class="comment">//---------DeciderToPhyInterface implementation-----------</span>
<a name="l00507"></a>00507 <span class="comment"></span>
<a name="l00513"></a>00513   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00079.html#a304e09a4309820bc45450f8a5fcfcb34" title="Fills the passed AirFrameVector with all air frames that intersect with the time interval [from...">getChannelInfo</a>(simtime_t_cref from, simtime_t_cref to, AirFrameVector&amp; out) <span class="keyword">const</span>;
<a name="l00514"></a>00514 
<a name="l00528"></a>00528   <span class="keyword">virtual</span> <a class="code" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>* <a class="code" href="a00079.html#a2c55926187883df5bc322c947d317534" title="Returns a Mapping which defines the thermal noise in the passed time frame (in mW).">getThermalNoise</a>(simtime_t_cref from, simtime_t_cref to);
<a name="l00529"></a>00529 
<a name="l00536"></a>00536   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00079.html#a319e413b963f03ff218b0d0024fb66b9" title="Called by the Decider to send a control message to the MACLayer.">sendControlMsgToMac</a>(cMessage* msg);
<a name="l00537"></a>00537 
<a name="l00546"></a>00546   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00079.html#ad81919dcafb2d568303e9ed362dafd93" title="Called to send an AirFrame with DeciderResult to the MACLayer.">sendUp</a>(airframe_ptr_t packet, <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>* result);
<a name="l00547"></a>00547 
<a name="l00551"></a>00551   <span class="keyword">virtual</span> simtime_t <a class="code" href="a00079.html#afdcd74839d4a7c6ea34062c8e409220d" title="Returns the current simulation time.">getSimTime</a>() <span class="keyword">const</span>;
<a name="l00552"></a>00552 
<a name="l00560"></a>00560   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00079.html#af85151048dba05ec27e378000fd95403" title="Tells the PhyLayer to cancel a scheduled message (AirFrame or ControlMessage).">cancelScheduledMessage</a>(cMessage* msg);
<a name="l00561"></a>00561 
<a name="l00570"></a>00570   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00079.html#a223fb24be9268abba32e90181fa248b9" title="Tells the PhyLayer to reschedule a message (AirFrame or ControlMessage).">rescheduleMessage</a>(cMessage* msg, simtime_t_cref t);
<a name="l00571"></a>00571 
<a name="l00576"></a>00576   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00140.html#a523efb31254a730e699983b50dbee44d" title="Draws the passed amount of current (in mA) over time from the battery on account of the passed accoun...">drawCurrent</a>(<span class="keywordtype">double</span> amount, <span class="keywordtype">int</span> activity);
<a name="l00577"></a>00577 
<a name="l00584"></a>00584   <span class="keywordtype">void</span> <a class="code" href="a00079.html#a9183eb9c635a185f18da631f2d2d9f1c" title="Utility method to enable a Decider, which isn&#39;t an OMNeT-module, to use the OMNeT-method &#39;recordScala...">recordScalar</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">double</span> value, <span class="keyword">const</span> <span class="keywordtype">char</span> *unit=NULL);
<a name="l00585"></a>00585 
<a name="l00601"></a>00601    <span class="keyword">virtual</span> cObject* setUpControlInfo(cMessage *<span class="keyword">const</span> pMsg, <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a> *<span class="keyword">const</span> pDeciderResult);
<a name="l00602"></a>00602 };
<a name="l00603"></a>00603 
<a name="l00604"></a>00604 <span class="preprocessor">#endif </span><span class="comment">/*BASEPHYLAYER_*/</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>BasePhyLayer.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:29 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
